<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>享购网</title>
    <link rel="stylesheet" href="/libs/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/shopCase.css">
</head>
<body>
    <div class="header clear-fix"></div>
    <div class="payMoney container">
       
        <div class="p-body">
           
           <div class="shopCarInfo" id="shopCarInfo">
               
           </div>
          <script type="text/html" id="shopCarInfoTemplate">
                  <table class="table table-bordered table-condensed carTable">
                      <thead >
                          <th><a href="javascript:;" id="edit">全选</a><input type="checkbox" id="allCheck"></th>
                          <th>商品名称</th>
                          <th>价格</th>
                          <th>购买数量</th>
                          <th>小计</th>
                          <th>操作</th>
                      </thead>
                      <tbody class="shopcont">
                        {{each cartList shop}}
                          <tr data-id="{{shop.id}}">
                              <td class="countTd">
                                  <label>
                                  <input type="checkbox" {{shop.check?'checked':''}} class="checks">
                                  </label>
                              </td>
                              <td>
                                  <a href="/html/detail.html?id={{shop.id}}">
                                      <img src="{{shop.photo.url}}" alt="" class="shopimg">
                                  </a>
                                  <span>{{shop.title.slice(0,10)}}....</span>
                              </td>
                              <td class="shop-Price">
                                  <span>{{shop.price}}</span>
                              </td>
                              <td class="countTd">
                                  <button  class="minus count-btn">-</button>
                                  <input type="text" value="{{shop.num}}" class="countInput">
                                  <button class="plus count-btn">+</button>
                              </td>
                              <td class="subtotal">
                                <span>{{(shop.num*shop.price).toFixed(2)}}</span>
                              </td>
                              <td>
                                <button class="del-btn">删除</button>
                              </td>
                            
                          </tr>
                         {{/each}} 
                      </tbody>
                      <tfoot>
                        <tr>
                          <td > 
                          </td>
                          <td class="needTopay">
                              <span><strong>商品应付金额：<strong></span>
                              <em>￥</em>
                              <strong><span id="Paymoney"></span><strong>
                          </td>
                          <td>
                            <button class="submit-btn">提交订单</button>
                          </td>
                          <td></td>
                          <td></td>
                          <td></td>
                      </tr>
                      </tfoot>
                    </table>
            
                    
          </script>
           <div class="empty" id="cart-empty">
                <p>您的购物车还没有商品呢!快去选购吧亲~</p>
                <a href="/index.html">返回首页</a>
                <a href="/html/shoplist.html?id=12">去选款式</a>
           </div>
        </div>
    </div>
    <script src="/libs/require/require.min.js" data-main="/js/shopCase"></script>
    <div class="footer"></div>
</body>
</html>